package cn.gdcp.myapplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class ActivityA extends Activity {
    private Button button;
    private final String ATG="ActivityA";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.e(ATG,"onCreate");
        setContentView(R.layout.activity_a);
        button=(Button) findViewById(R.id.bt1);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent();
                intent.setClass(ActivityA.this,ActivityB.class);
                startActivity(intent);
            }
        });

    }
    @Override
    protected void onStart() {
        super.onStart();
        Log.e(ATG,"onStart");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.e(ATG,"onResume");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.e(ATG,"onPause");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.e(ATG,"onStop");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.e(ATG,"onDestroy");
    }
}
